;
(function() {
	var Fiber = require('fibers');
	var http = require("http");

	function curl(url) {
		var fiber = Fiber.current;
		var result = "";
		http.get(url, function(res) {
			res.on("data", function(chunk) {
				result += chunk;
			}).on("end", function() {
				//继续
				fiber.run();
			})
		});
		Fiber.yield(); //挂起
		return result
	};
	module.exports = {
		curl: curl
	}
}());